package cn.wusifx.zabbix.request.builder.webscenario;

import cn.wusifx.zabbix.request.BaseRequest;
import cn.wusifx.zabbix.request.builder.CreateRequestBuilder;

import java.util.List;
import java.util.Map;

/**
 * https://www.zabbix.com/documentation/4.0/manual/api/reference/httptest/create
 */
public class HttptestCreateRequestBuilder extends CreateRequestBuilder {
    private String name;
    private String hostId;
    private List<Map<String,Object>> steps;
    public HttptestCreateRequestBuilder(String auth) {
        super("httptest.create", auth);
    }

    public HttptestCreateRequestBuilder(Long id, String auth) {
        super("httptest.create", id, auth);
    }

    public String getName() {
        return name;
    }

    public HttptestCreateRequestBuilder setName(String name) {
        this.name = name;
        return this;
    }

    public String getHostId() {
        return hostId;
    }

    public HttptestCreateRequestBuilder setHostId(String hostId) {
        this.hostId = hostId;
        return this;
    }

    public List<Map<String, Object>> getSteps() {
        return steps;
    }

    public HttptestCreateRequestBuilder setSteps(List<Map<String, Object>> steps) {
        this.steps = steps;
        return this;
    }

    @Override
    public BaseRequest<Map<String, Object>> builder() {
        baseRequest.getParams().put("name",name);
        baseRequest.getParams().put("hostid",hostId);
        baseRequest.getParams().put("steps",steps);
        return baseRequest;
    }
}
